CREATE TABLE [dbo].[TRTIOP_DCNT]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NOT NULL,
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TRTIOP_DC__NU_CO__0638D371] DEFAULT ((0)),
[TI_DOCU] [dbo].[TD_VC_003] NOT NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NOT NULL,
[NV_INFO_CNTA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TRTIOP_DC__NV_IN__072CF7AA] DEFAULT ((0)),
[IN_CNTA_MONE] [dbo].[TD_VC_001] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[ST_AUXI_EMPR] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TRTIOP_DC__ST_AU__08211BE3] DEFAULT ('N'),
[TI_AUXI_EMPR] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TRTIOP_DC__TI_AU__0A096455] DEFAULT ('N'),
[DE_GLOS] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TRTIOP_DC__CO_US__0AFD888E] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TRTIOP_DC__FE_US__0BF1ACC7] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TRTIOP_DC__CO_US__0CE5D100] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TRTIOP_DC__FE_US__0DD9F539] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRTIOP_DCNT] WITH NOCHECK ADD CONSTRAINT [CK__TRTIOP_DC__ST_AU__0915401C] CHECK NOT FOR REPLICATION (([ST_AUXI_EMPR]='N' OR [ST_AUXI_EMPR]='S'))
GO
ALTER TABLE [dbo].[TRTIOP_DCNT] ADD CONSTRAINT [PK__TRTIOP_D__D9412C2F22AAF4ED] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TIPO_OPER], [NU_CORR], [TI_DOCU], [CO_CNTA_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRTIOP_DCNT] ADD CONSTRAINT [FK__TRTIOP_DC__CO_EM__25A75D29] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
